<script setup lang="ts">

import {UserType} from "../models/user";
import {onMounted} from "vue";

interface UserCardListProps {
  user: UserType;
}

const props = defineProps<UserCardListProps>()

onMounted(()=>{
  console.log(props.user)
})
</script>

<template>
  <van-card v-if="user"
            :desc="props.user.userProfile"
            :title="user.userName"
            :thumb="user.avatarUrl"
            :tag="user.gender===0?'男':'女'"
  >
    <template #tags>
      <van-tag plain type="danger" v-for="tag in user.userTags" style="margin-right: 10px;margin-top: 10px">{{ tag }}</van-tag>
    </template>
    <template #footer>
      <van-button size="mini">联系他</van-button>
    </template>
  </van-card>
</template>

<style scoped>

</style>